package cn.jiyun.dao;

import cn.jiyun.pojo.SetmealDish;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishDao extends BaseMapper<SetmealDish> {


    @Delete("delete FROM `setmeal_dish` where setmeal_dish.setmeal_id = #{id}")
    void deleteByIdsc(@Param("id") Long id);

    @Select("SELECT * FROM `setmeal_dish` where setmeal_id= #{id}")
    List<SetmealDish> selectListhx(@Param("id") Long id);
}
